//
//  myButton.m
//  MusicPlayer
//
//  Created by 李欢 on 15/5/27.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "myButton.h"

@implementation myButton

- (void)dealloc
{
    [_imageview release];
    [_aLabel release];
    [super dealloc];
}

-(instancetype)initWithFrame:(CGRect)frame
{
    [super initWithFrame:frame];
    if (self) {
        [self creatButton];
    }
    return self;
}

-(void)creatButton
{
    self.imageview = [[UIImageView alloc]initWithFrame:CGRectMake(35, 0, 40, 40)];
    [self addSubview:self.imageview];
//    [self.imageview setBackgroundColor:[UIColor yellowColor]];
    [self.imageview release];
    
    self.aLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 40, 90, 40)];
    [self addSubview:self.aLabel];
    self.aLabel.textAlignment = 1;
//    [self.aLabel setBackgroundColor:[UIColor purpleColor]];
    [self.aLabel release];
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
